Repository navigation
2026.10.19: security page by protection, answer content rules; pin core v0.73.0 - #329
Merged
Merged
Conversation
…text content rules - Tabs renamed to Secrets & privacy / Dangerous commands / Content filter, each with a status dot; every guard has the same three states On / Monitor / Off, with a one-line state sentence and the enabled-rule count. - Rule lists: built-ins grouped by category with a group checkbox (indeterminate when partly on) that turns the group on or off in one write, a custom group, a search box over names and patterns, per-row switch and inline action select, and "Monitoring" next to the action while the guard is in Monitor. - Content rule dialog: Checks (request / answer / both), match with a case switch on the same row, actions Refuse / Delete / Replace / Record only with disabled options, reasons and automatic switches when answers are checked, replacement text prefilled with ***, and testing as request or as answer. - Redaction rules get an action (replace with placeholder / record only) and a case switch instead of a toggle button. - Log and hit detail show answer-text hits and replaced / deleted segment counts. - Notifications: record-only and Monitor hits of all three guards notify with the rule and upstream only, at most once per rule in five minutes, and hits that arrive together are merged into one notification; the cut notification stays. - Protocol 48 types and the bulk endpoint call live in src/security/contract-types.ts until core lands and the generated types carry them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Integrates the security restructure UI with core's implementation
(ThinkWatch-Core feat/security-restructure, protocol 48).
- Drop src/security/contract-types.ts. Types come from the generated
tw-api bindings (ContentScope, RulesToggle, SecretItem.replaced,
OutcomeDetail replaced with segments/replacement, ...); the small
helpers (scopeOf, actionOf, replacedOf, DEFAULT_REPLACEMENT) move to
src/security/rules.ts.
- Bulk enable/disable goes through call("SetRulesEnabled"), added to
both allow-lists (src/control.ts, src-tauri/src/call.rs).
- core.zh.json: Chinese for config.rule_scope_{empty,block,codepoints},
security.rule_scope_{empty,block,codepoints},
security.redact_action_unknown, security.unknown_custom_rule and the
renamed security.content_action_bad; drop
security.no_action_of_its_own.
- Traffic list: content hits that were replaced get a "Replaced" badge
next to "Deleted", for requests and answers alike, from live events and
from history. The redaction badge counts only values sent as is when a
record-only rule matched while redaction is on (per-item replaced).
- Rule dialogs scroll inside a capped height instead of overflowing the
window.
This branch now needs the protocol 48 bindings: the commit that pins core
to its release tag and regenerates src/generated/tw-api.ts follows when
core is tagged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 2026.10.19 with the restructured security page, pinned to core v0.73.0 (control-plane protocol 48).
***).tw-api.ts.🤖 Generated with Claude Code